Boook club R-Ladies Bergen, R-Ladies Den Bosch, R-Ladies Amsterdam
How Git works, concepts, applying it to data science
For each project:
git clone https://github.com/jennybc/happy-git-with-r.gitgit remote --verbosegit add foo.txt : add foo.txt to the index (staging area)git commit --message "A commit message"git statusgit log git log --oneline git diffgit branch issue-5git checkout issue-5git checkout -b issue-5git commit --all -m "WIP"git checkout maingit checkout issue-5git reset HEAD^git checkout main
git merge issue-5
git add index.htmlgit commitgit merge --abortgit clonegit remote add happygit https://github.com/jennybc/happy-git-with-r.gitupstream:git remote add upstream https://github.com/TRUE_OWNER/REPO.gitgit fetch happygit: downloads the remote commits to your local repo without changing the local branchgit fetch + git merge ≈ git pull# push my local changes to the origin remote's main branch git push origin maingit config --global push.default current
git diff, git reset and git checkoutHEAD~1 or HEAD^: the commit just before HEADHEAD~3 or HEAD^^^: three commits before HEADCopying a specific SHA is easy in visual Git tools like GitHub and GitKraken
[Boook club R-Ladies Bergen, R-Ladies Den Bosch, R-Ladies Amsterdam]